package com.three.controller;

import com.three.service.GoodsService;
import com.three.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

/**
 * @author 袁大毛
 * * @date 2024/10/31 上午11:44
 * @描述
 */
@RestController
@RequestMapping("/main")
public class MainController {
    @Autowired
    private GoodsService goodsService;
    //得到登陆人名称，登陆人所在店铺
    @GetMapping("/getStaffInfo")
    public R getUserName(){
        return goodsService.getStaffAll();
    }
    //获取店铺数目，员工数目，商品总数
    @GetMapping("/getBranchStaffGoodsInfo")
    public R getBranchStaffGoodsInfo(){
        return goodsService.getBranchStaffGoodsInfo();
    }

    //获取商品售价统计信息,查询商品的名称和进价售价 首页统计图 1
    @GetMapping("getGoodsAllInfo")
    public R getGoodsAllInfo(){
        return goodsService.getGoodsAllInfo();
    }

    //该门店 下部门人数
    @GetMapping("getDeptStaffCounts")
    public R getDeptStaffCounts(){
        return goodsService.getDeptStaffCounts();
    }

    //计算本门店商品库存统计
    @GetMapping("/getGoodsAndNameCounts")
    public R getGoodsAndNameCounts(){
        return goodsService.getGoodsAndNameCounts();
    }


}